package Manage;

import info.gridworld.actor.ActorWorld;

public class Counter{
	private static int money = 2000;
	private static int lives = 50;
	private static int kills;
	private static int recordKills;
	private static boolean go = true;
	public static ActorWorld world;
	public Counter(){
		money = 0;
		lives = 0;
		kills = 0;
		recordKills = 0;
	}
	public static void setWorld(ActorWorld w){
		world = w;
	}
	public static void addMoney(int coin){
		money += coin;
	}
	public static int getMoney(){
		return money;
	}
	public static void setLives(int l){
		lives = l;
	}
	public static void resetEverything(){
		lives = 50;
		kills = 0;
		money = 2000;
	}
	public static void fixGo(){
		go = true;
	}
	public static void takeLife(){
		if (go == true){
			if (lives == 0){
				world.OutputGameOver();
				go = false;
			}else{
				lives --;
			}
		}
	}
	public static int getLives(){
		return lives;
	}
	public static void addKill(){
		kills ++;
		if(kills > recordKills){
			recordKills = kills;
		}
	}
	public static int getRecordKills(){
		return recordKills;
	}
	public static int getKills(){
		return kills;
	}
}
